/** 
 * Project Name:tinysql 
 * File Name:TinysqlPlus.java 
 * Package Name:com.wdy.golden.tinysql.plus 
 * Date:2021年4月25日上午11:15:08 
 * 
*/  
package com.wdy.golden.tinysql.plus.common;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import com.wdy.golden.tinysql.annotation.TinyDelete;
import com.wdy.golden.tinysql.annotation.TinyInsert;
import com.wdy.golden.tinysql.annotation.TinySelect;
import com.wdy.golden.tinysql.annotation.TinyUpdate;
import com.wdy.golden.tinysql.plus.annotation.TinyCommonOperation;

/** 
 * ClassName: TinysqlPlus <br/> 
 * Function: 提供固定的几个通用单表CRUD操作. <br/> 
 * Reason:   TODO ADD REASON. <br/> 
 * Date:     2021年4月25日 上午11:15:08 <br/> 
 * @author   DongYe_Wu 
 * @version
 * @see       
 */
public interface ITinysqlPlus<T> {
	@TinyInsert
	@TinyCommonOperation(name = "tinyInsert")
	public int tinyInsert(T entity);

	@TinyDelete
	@TinyCommonOperation(name = "tinyDeleteById")
	public int tinyDeleteById(Serializable id);
	@TinyDelete
	@TinyCommonOperation(name = "tinyDeleteByIds")
	public int tinyDeleteByIds(Collection<? extends Serializable> ids);
	
	@TinySelect
	@TinyCommonOperation(name = "tinySelectById")
	public T tinySelectById(Serializable id);
	@TinySelect
	@TinyCommonOperation(name = "tinySelectByIds")
	public List<T> tinySelectByIds(Collection<? extends Serializable> ids);

	@TinyUpdate
	@TinyCommonOperation(name = "tinyUpdateById")
	public int tinyUpdateById(T entity, Serializable id);
	@TinyUpdate
	@TinyCommonOperation(name = "tinyUpdateByIds")
	public int tinyUpdateByIds(T entity, Collection<? extends Serializable> ids);
	
}
